package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OisDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("s1.obj");//节点输入流
        ObjectInputStream ois = new ObjectInputStream(fis);//处理输入流
        System.out.println(ois.readObject());//进行读取，反序列化对象
        ois.close();
        fis.close();
    }
}
